package com.jxc.jxc01.grc.service.impl;

import com.jxc.jxc01.grc.dao.IVendorDao;
import com.jxc.jxc01.grc.dao.impl.VendorDaoImpl;
import com.jxc.jxc01.grc.entity.Vendor;
import com.jxc.jxc01.grc.service.IVendorService;


import java.util.List;

public class VendorServiceImpl implements IVendorService {

    IVendorDao vendorDao = new VendorDaoImpl();

    /**
     * 添加供应商
     * @param vendor
     * @return
     */
    @Override
    public int addVendor(Vendor vendor) {
        return vendorDao.addVendor(vendor);
    }

    /**
     * 根据id删除供应商
     * @param id
     * @return
     */
    @Override
    public int deleteVendor(int id) {
        return vendorDao.deleteVendor(id);
    }
    /**
     * 更新供应商信息
     * @param vendor
     * @return
     */
    @Override
    public int reviseVendor(Vendor vendor) {
        return vendorDao.reviseVendor(vendor);
    }

    @Override
    public List<Vendor> queryVendors() {
        return vendorDao.queryVendors();
    }

    @Override
    public int queryVendorsTotalCount() {
        return vendorDao.queryVendorsTotalCount();
    }

    @Override
    public List<Vendor> queryVendorsByFuzzyStr(String suppliername) {
        return vendorDao.queryVendorsByFuzzyStr(suppliername);
    }


}
